home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 242 / Issue 242 - April 2008 - DPCS0408DVD.ISO / Software Money Savers / VirtualDub / Source / VirtualDub-1.7.7-src.7z / src / Kasumi / source / blt_reference.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-14  |  19.6 KB  |  277 lines

  1. #include <vd2/system/vdtypes.h>
  2. #include <vd2/Kasumi/pixmap.h>
  3. #include <vd2/Kasumi/pixmaputils.h>
  4.  
  5. #define DECLARE_PALETTED(x, y) extern void VDPixmapBlt_##x##_to_##y##_reference(void *dst0, ptrdiff_t dstpitch, const void *src0, ptrdiff_t srcpitch, vdpixsize w, vdpixsize h, const void *pal0)
  6. #define DECLARE_RGB(x, y) extern void VDPixmapBlt_##x##_to_##y##_reference(void *dst0, ptrdiff_t dstpitch, const void *src0, ptrdiff_t srcpitch, vdpixsize w, vdpixsize h)
  7. #define DECLARE_YUV(x, y) extern void VDPixmapBlt_##x##_to_##y##_reference(void *dst0, ptrdiff_t dstpitch, const void *src0, ptrdiff_t srcpitch, vdpixsize w, vdpixsize h)
  8. #define DECLARE_YUV_REV(x, y) void VDPixmapBlt_##x##_to_##y##_reference(void *dst0, ptrdiff_t dstpitch, const void *src0, ptrdiff_t srcpitch, vdpixsize w, vdpixsize h)
  9. #define DECLARE_YUV_PLANAR(x, y) extern void VDPixmapBlt_##x##_to_##y##_reference(const VDPixmap& dst, const VDPixmap& src, vdpixsize w, vdpixsize h)
  10.  
  11. DECLARE_RGB(RGB565,      XRGB1555);
  12. DECLARE_RGB(RGB888,   XRGB1555);
  13. DECLARE_RGB(XRGB8888, XRGB1555);
  14. DECLARE_RGB(XRGB1555, RGB565);
  15. DECLARE_RGB(RGB888,   RGB565);
  16. DECLARE_RGB(XRGB8888, RGB565);
  17. DECLARE_RGB(XRGB1555, RGB888);
  18. DECLARE_RGB(RGB565,   RGB888);
  19. DECLARE_RGB(XRGB8888, RGB888);
  20. DECLARE_RGB(XRGB1555, XRGB8888);
  21. DECLARE_RGB(RGB565,   XRGB8888);
  22. DECLARE_RGB(RGB888,   XRGB8888);
  23.  
  24. DECLARE_PALETTED(Pal1, Any8);
  25. DECLARE_PALETTED(Pal1, Any16);
  26. DECLARE_PALETTED(Pal1, Any24);
  27. DECLARE_PALETTED(Pal1, Any32);
  28. DECLARE_PALETTED(Pal2, Any8);
  29. DECLARE_PALETTED(Pal2, Any16);
  30. DECLARE_PALETTED(Pal2, Any24);
  31. DECLARE_PALETTED(Pal2, Any32);
  32. DECLARE_PALETTED(Pal4, Any8);
  33. DECLARE_PALETTED(Pal4, Any16);
  34. DECLARE_PALETTED(Pal4, Any24);
  35. DECLARE_PALETTED(Pal4, Any32);
  36. DECLARE_PALETTED(Pal8, Any8);
  37. DECLARE_PALETTED(Pal8, Any16);
  38. DECLARE_PALETTED(Pal8, Any24);
  39. DECLARE_PALETTED(Pal8, Any32);
  40.  
  41. DECLARE_YUV(XVYU, UYVY);
  42. DECLARE_YUV(XVYU, YUYV);
  43. DECLARE_YUV(Y8, UYVY);
  44. DECLARE_YUV(Y8, YUYV);
  45. DECLARE_YUV(UYVY, Y8);
  46. DECLARE_YUV(YUYV, Y8);
  47. DECLARE_YUV(UYVY, YUYV);
  48. DECLARE_YUV_PLANAR(YUV411, YV12);
  49.  
  50. DECLARE_YUV(UYVY, XRGB1555);
  51. DECLARE_YUV(UYVY, RGB565);
  52. DECLARE_YUV(UYVY, RGB888);
  53. DECLARE_YUV(UYVY, XRGB8888);
  54. DECLARE_YUV(YUYV, XRGB1555);
  55. DECLARE_YUV(YUYV, RGB565);
  56. DECLARE_YUV(YUYV, RGB888);
  57. DECLARE_YUV(YUYV, XRGB8888);
  58. DECLARE_YUV(Y8, XRGB1555);
  59. DECLARE_YUV(Y8, RGB565);
  60. DECLARE_YUV(Y8, RGB888);
  61. DECLARE_YUV(Y8, XRGB8888);
  62.  
  63. DECLARE_YUV_REV(XRGB1555, Y8);
  64. DECLARE_YUV_REV(RGB565,   Y8);
  65. DECLARE_YUV_REV(RGB888,   Y8);
  66. DECLARE_YUV_REV(XRGB8888, Y8);
  67.  
  68. DECLARE_YUV_REV(XRGB1555, XVYU);
  69. DECLARE_YUV_REV(RGB565,   XVYU);
  70. DECLARE_YUV_REV(RGB888,   XVYU);
  71. DECLARE_YUV_REV(XRGB8888, XVYU);
  72.  
  73. DECLARE_YUV_PLANAR(YV12, XRGB1555);
  74. DECLARE_YUV_PLANAR(YV12, RGB565);
  75. DECLARE_YUV_PLANAR(YV12, RGB888);
  76. DECLARE_YUV_PLANAR(YV12, XRGB8888);
  77.  
  78. DECLARE_YUV_PLANAR(YUV411, XRGB1555);
  79. DECLARE_YUV_PLANAR(YUV411, RGB565);
  80. DECLARE_YUV_PLANAR(YUV411, RGB888);
  81. DECLARE_YUV_PLANAR(YUV411, XRGB8888);
  82.  
  83. extern void VDPixmapBlt_YUVPlanar_decode_reference(const VDPixmap& dst, const VDPixmap& src, vdpixsize w, vdpixsize h);
  84. extern void VDPixmapBlt_YUVPlanar_encode_reference(const VDPixmap& dst, const VDPixmap& src, vdpixsize w, vdpixsize h);
  85. extern void VDPixmapBlt_YUVPlanar_convert_reference(const VDPixmap& dst, const VDPixmap& src, vdpixsize w, vdpixsize h);
  86.  
  87. using namespace nsVDPixmap;
  88.  
  89. tpVDPixBltTable VDGetPixBltTableReference() {
  90.     static void *sReferenceMap[kPixFormat_Max_Standard][kPixFormat_Max_Standard] = {0};
  91.  
  92.     sReferenceMap[kPixFormat_Pal1][kPixFormat_Y8      ] = VDPixmapBlt_Pal1_to_Any8_reference;
  93.     sReferenceMap[kPixFormat_Pal1][kPixFormat_XRGB1555] = VDPixmapBlt_Pal1_to_Any16_reference;
  94.     sReferenceMap[kPixFormat_Pal1][kPixFormat_RGB565  ] = VDPixmapBlt_Pal1_to_Any16_reference;
  95.     sReferenceMap[kPixFormat_Pal1][kPixFormat_RGB888  ] = VDPixmapBlt_Pal1_to_Any24_reference;
  96.     sReferenceMap[kPixFormat_Pal1][kPixFormat_XRGB8888] = VDPixmapBlt_Pal1_to_Any32_reference;
  97.     sReferenceMap[kPixFormat_Pal2][kPixFormat_Y8      ] = VDPixmapBlt_Pal2_to_Any8_reference;
  98.     sReferenceMap[kPixFormat_Pal2][kPixFormat_XRGB1555] = VDPixmapBlt_Pal2_to_Any16_reference;
  99.     sReferenceMap[kPixFormat_Pal2][kPixFormat_RGB565  ] = VDPixmapBlt_Pal2_to_Any16_reference;
  100.     sReferenceMap[kPixFormat_Pal2][kPixFormat_RGB888  ] = VDPixmapBlt_Pal2_to_Any24_reference;
  101.     sReferenceMap[kPixFormat_Pal2][kPixFormat_XRGB8888] = VDPixmapBlt_Pal2_to_Any32_reference;
  102.     sReferenceMap[kPixFormat_Pal4][kPixFormat_Y8      ] = VDPixmapBlt_Pal4_to_Any8_reference;
  103.     sReferenceMap[kPixFormat_Pal4][kPixFormat_XRGB1555] = VDPixmapBlt_Pal4_to_Any16_reference;
  104.     sReferenceMap[kPixFormat_Pal4][kPixFormat_RGB565  ] = VDPixmapBlt_Pal4_to_Any16_reference;
  105.     sReferenceMap[kPixFormat_Pal4][kPixFormat_RGB888  ] = VDPixmapBlt_Pal4_to_Any24_reference;
  106.     sReferenceMap[kPixFormat_Pal4][kPixFormat_XRGB8888] = VDPixmapBlt_Pal4_to_Any32_reference;
  107.     sReferenceMap[kPixFormat_Pal8][kPixFormat_Y8      ] = VDPixmapBlt_Pal8_to_Any8_reference;
  108.     sReferenceMap[kPixFormat_Pal8][kPixFormat_XRGB1555] = VDPixmapBlt_Pal8_to_Any16_reference;
  109.     sReferenceMap[kPixFormat_Pal8][kPixFormat_RGB565  ] = VDPixmapBlt_Pal8_to_Any16_reference;
  110.     sReferenceMap[kPixFormat_Pal8][kPixFormat_RGB888  ] = VDPixmapBlt_Pal8_to_Any24_reference;
  111.     sReferenceMap[kPixFormat_Pal8][kPixFormat_XRGB8888] = VDPixmapBlt_Pal8_to_Any32_reference;
  112.  
  113.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_RGB565  ] = VDPixmapBlt_XRGB1555_to_RGB565_reference;
  114.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_RGB888  ] = VDPixmapBlt_XRGB1555_to_RGB888_reference;
  115.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_XRGB8888] = VDPixmapBlt_XRGB1555_to_XRGB8888_reference;
  116.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_XRGB1555] = VDPixmapBlt_RGB565_to_XRGB1555_reference;
  117.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_RGB888  ] = VDPixmapBlt_RGB565_to_RGB888_reference;
  118.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_XRGB8888] = VDPixmapBlt_RGB565_to_XRGB8888_reference;
  119.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_XRGB1555] = VDPixmapBlt_RGB888_to_XRGB1555_reference;
  120.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_RGB565  ] = VDPixmapBlt_RGB888_to_RGB565_reference;
  121.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_XRGB8888] = VDPixmapBlt_RGB888_to_XRGB8888_reference;
  122.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_XRGB1555] = VDPixmapBlt_XRGB8888_to_XRGB1555_reference;
  123.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_RGB565  ] = VDPixmapBlt_XRGB8888_to_RGB565_reference;
  124.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_RGB888  ] = VDPixmapBlt_XRGB8888_to_RGB888_reference;
  125.  
  126.     sReferenceMap[kPixFormat_YUV444_XVYU][kPixFormat_YUV422_UYVY] = VDPixmapBlt_XVYU_to_UYVY_reference;
  127.     sReferenceMap[kPixFormat_YUV444_XVYU][kPixFormat_YUV422_YUYV] = VDPixmapBlt_XVYU_to_YUYV_reference;
  128.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV422_UYVY] = VDPixmapBlt_Y8_to_UYVY_reference;
  129.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV422_YUYV] = VDPixmapBlt_Y8_to_YUYV_reference;
  130.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_Y8] = VDPixmapBlt_UYVY_to_Y8_reference;
  131.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_Y8] = VDPixmapBlt_YUYV_to_Y8_reference;
  132.  
  133.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_XRGB1555] = VDPixmapBlt_UYVY_to_XRGB1555_reference;
  134.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_RGB565  ] = VDPixmapBlt_UYVY_to_RGB565_reference;
  135.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_RGB888  ] = VDPixmapBlt_UYVY_to_RGB888_reference;
  136.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_XRGB8888] = VDPixmapBlt_UYVY_to_XRGB8888_reference;
  137.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_XRGB1555] = VDPixmapBlt_YUYV_to_XRGB1555_reference;
  138.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_RGB565  ] = VDPixmapBlt_YUYV_to_RGB565_reference;
  139.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_RGB888  ] = VDPixmapBlt_YUYV_to_RGB888_reference;
  140.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_XRGB8888] = VDPixmapBlt_YUYV_to_XRGB8888_reference;
  141.     sReferenceMap[kPixFormat_Y8][kPixFormat_XRGB1555] = VDPixmapBlt_Y8_to_XRGB1555_reference;
  142.     sReferenceMap[kPixFormat_Y8][kPixFormat_RGB565  ] = VDPixmapBlt_Y8_to_RGB565_reference;
  143.     sReferenceMap[kPixFormat_Y8][kPixFormat_RGB888  ] = VDPixmapBlt_Y8_to_RGB888_reference;
  144.     sReferenceMap[kPixFormat_Y8][kPixFormat_XRGB8888] = VDPixmapBlt_Y8_to_XRGB8888_reference;
  145.  
  146.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV444_XVYU] = VDPixmapBlt_XRGB1555_to_XVYU_reference;
  147.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV444_XVYU] = VDPixmapBlt_RGB565_to_XVYU_reference;
  148.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV444_XVYU] = VDPixmapBlt_RGB888_to_XVYU_reference;
  149.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV444_XVYU] = VDPixmapBlt_XRGB8888_to_XVYU_reference;
  150.  
  151.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_Y8] = VDPixmapBlt_XRGB1555_to_Y8_reference;
  152.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_Y8] = VDPixmapBlt_RGB565_to_Y8_reference;
  153.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_Y8] = VDPixmapBlt_RGB888_to_Y8_reference;
  154.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_Y8] = VDPixmapBlt_XRGB8888_to_Y8_reference;
  155.  
  156. #if 0
  157.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YV12_to_XRGB1555_reference;
  158.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YV12_to_RGB565_reference;
  159.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YV12_to_RGB888_reference;
  160.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YV12_to_XRGB8888_reference;
  161.  
  162.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUV411_to_XRGB1555_reference;
  163.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUV411_to_RGB565_reference;
  164.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUV411_to_RGB888_reference;
  165.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUV411_to_XRGB8888_reference;
  166. #else
  167.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUVPlanar_decode_reference;
  168.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  169.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  170.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUVPlanar_decode_reference;
  171.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV422_UYVY] = VDPixmapBlt_YUVPlanar_decode_reference;
  172.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV422_YUYV] = VDPixmapBlt_YUVPlanar_decode_reference;
  173.  
  174.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUVPlanar_decode_reference;
  175.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  176.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  177.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUVPlanar_decode_reference;
  178.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV422_UYVY] = VDPixmapBlt_YUVPlanar_decode_reference;
  179.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV422_YUYV] = VDPixmapBlt_YUVPlanar_decode_reference;
  180.  
  181.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUVPlanar_decode_reference;
  182.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  183.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  184.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUVPlanar_decode_reference;
  185.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV422_UYVY] = VDPixmapBlt_YUVPlanar_decode_reference;
  186.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV422_YUYV] = VDPixmapBlt_YUVPlanar_decode_reference;
  187.  
  188.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUVPlanar_decode_reference;
  189.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  190.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  191.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUVPlanar_decode_reference;
  192.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV422_UYVY] = VDPixmapBlt_YUVPlanar_decode_reference;
  193.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV422_YUYV] = VDPixmapBlt_YUVPlanar_decode_reference;
  194.  
  195.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_XRGB1555] = VDPixmapBlt_YUVPlanar_decode_reference;
  196.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_RGB565  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  197.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_RGB888  ] = VDPixmapBlt_YUVPlanar_decode_reference;
  198.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_XRGB8888] = VDPixmapBlt_YUVPlanar_decode_reference;
  199.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV422_UYVY] = VDPixmapBlt_YUVPlanar_decode_reference;
  200.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV422_YUYV] = VDPixmapBlt_YUVPlanar_decode_reference;
  201. #endif
  202.  
  203.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUV411_to_YV12_reference;
  204.  
  205.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV422_YUYV] = VDPixmapBlt_UYVY_to_YUYV_reference;
  206.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV422_UYVY] = VDPixmapBlt_UYVY_to_YUYV_reference;        // not an error -- same routine
  207.  
  208.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  209.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  210.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  211.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  212.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  213.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  214.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  215.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  216.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  217.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  218.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  219.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  220.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  221.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  222.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  223.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  224.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  225.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  226.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  227.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  228.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  229.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  230.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  231.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  232.     sReferenceMap[kPixFormat_XRGB1555][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  233.     sReferenceMap[kPixFormat_RGB565  ][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  234.     sReferenceMap[kPixFormat_RGB888  ][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  235.     sReferenceMap[kPixFormat_XRGB8888][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  236.     sReferenceMap[kPixFormat_YUV422_UYVY][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  237.     sReferenceMap[kPixFormat_YUV422_YUYV][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_encode_reference;
  238.  
  239.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  240.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  241.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  242.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  243.     sReferenceMap[kPixFormat_YUV444_Planar][kPixFormat_Y8           ] = VDPixmapBlt_YUVPlanar_convert_reference;
  244.  
  245.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  246.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  247.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  248.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  249.     sReferenceMap[kPixFormat_YUV422_Planar][kPixFormat_Y8           ] = VDPixmapBlt_YUVPlanar_convert_reference;
  250.  
  251.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  252.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  253.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  254.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  255.     sReferenceMap[kPixFormat_YUV420_Planar][kPixFormat_Y8           ] = VDPixmapBlt_YUVPlanar_convert_reference;
  256.  
  257.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  258.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  259.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  260.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  261.     sReferenceMap[kPixFormat_YUV411_Planar][kPixFormat_Y8           ] = VDPixmapBlt_YUVPlanar_convert_reference;
  262.  
  263.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  264.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  265.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  266.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  267.     sReferenceMap[kPixFormat_YUV410_Planar][kPixFormat_Y8           ] = VDPixmapBlt_YUVPlanar_convert_reference;
  268.  
  269.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV444_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  270.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV422_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  271.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV420_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  272.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV411_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  273.     sReferenceMap[kPixFormat_Y8][kPixFormat_YUV410_Planar] = VDPixmapBlt_YUVPlanar_convert_reference;
  274.  
  275.     return sReferenceMap;
  276. }
  277.